import java.util.Arrays;
import java.util.stream.Collectors;

/**
 * @Author: zyf
 * @Date: 2024/04/25/12:55
 * @Description:
 */
public class Instruction {
    private final String ipmitool = "ipmitool";
    private final Option[] options;
    private final String command;

    public Instruction(Option[] options, String command) {
        this.options = options;
        this.command = command;
    }

    @Override
    public String toString() {
        return Arrays.stream(options)
                .map(String::valueOf)
                .collect(Collectors.joining(" ", ipmitool, command));
    }
}
